import {RouterModule, Routes} from '@angular/router';
import {NgModule} from '@angular/core';
import {SystemManagementComponent} from './system-management.component';

const routes: Routes = [
    {path: '', component: SystemManagementComponent,
        children: [
            {path: '', redirectTo: 'sys-organize', pathMatch: 'full'},
            {path: 'sys-organize', loadChildren: './sys-organize/sys-organize.module#SysOrganizeModule'},
            {path: 'sys-role', loadChildren: './sys-role/sys-role.module#SysRoleModule'},
            {path: 'sys-user', loadChildren: './sys-user/sys-user.module#SysUserModule'},
            {path: 'sys-function', loadChildren: './sys-function/sys-function.module#SysFunctionModule'},
            {path: 'sys-menu', loadChildren: './sys-menu/sys-menu.module#SysMenuModule'},
            {path: 'sys-permissions', loadChildren: './sys-permissions/sys-permissions.module#SysPermissionsModule'},
        ]
    }
];

@NgModule({
    imports: [RouterModule.forChild(routes)],
    exports: [RouterModule]
})
export class SystemManagementRoutingModule {
}
